package com.petmall.mapper;

import com.petmall.entity.Admin;
import org.apache.ibatis.annotations.*;

/**
 * Created by pig2guang on 2017/5/3.
 */
@Mapper
public interface AdminMapper {

    @Select("select * from tb_admin where admin_id = #{admin_id} and password = #{password}")
    public Admin selectAdmin(@Param("admin_id") String admin_id, @Param("password") String password);

    @Select("select * from tb_admin where admin_id = #{admin_id}")
    public Admin selectAdminById(@Param("admin_id") String admin_id);

    @Update("update tb_admin set update_time = #{update_time} where admin_id = #{admin_id}")
    public void updateTime(@Param("update_time") String update_time, @Param("admin_id") String admin_id);

}
